Skip to main content

Posts

Showing posts with the label Commands

Creating & Working On a CVS Branch Example Usage

Example usage OF Creating & Working On a CVS Branch Tried working hard on CVs commands, here is simple example for working in branch using CVS, CVS is becoming nomore use with everyone opting for SVN, still CVS usages is wide as it is old, Lets start with CVS commands to create a branch This is done with two commands, cvs tag -b release-1 //create branch cvs update -j release-1 //merge the changes in main tot Lets see with simple example Creating and working on a branch for the existing kernel source. #cvs co kernel/linux-2.6.26 #cd kernel/linux-2.6.26/ #cvs tag -b release-1 First we created a branch to the kernel source, as we are doing first release. Continue your development work for second release. After some time, reported a problem in the first release. So you need to Get the kernel source code of first release. #cvs co -r release-1 kernel/linux-2.6.24 and fix the problems Now If you want to merge these changes in to main trunk. #cvs update -j release-1 And you are done with ...

Create File Of Any Size in Linux Using DD Command

How do I create a file of any given size on Linux? using the dd command. $ dd if=/dev/zero of=testss bs=1024 count=1048576 This will create a file of size 1024 * 1048576 bytes (or 1 GB). where if - input file of - output file or the file to be created bs - block size in bytes count - # of blocks of size bs Easiest and fasted way to create file of 250GB using DD command $ dd if=/dev/zero of=tests bs=1 count=0 seek=250G read dd(1) - Linux man page

Access Samba Using Dos Commands List Here

I was searching for accessing samba using DOS command, Finally I managed it by own; here is list of useful command. To mount or to map the SAMBA folder to local machine. eg; to map public folder from and copy test.txt use :- net use z: \\computer\folder Map the Z: drive to the network path //computer/folder. net use z: \\2.168.4.500\public enter user-name (if connecting first time) enter password To copy the data to this drive ie to put file copy test.txt \\2.168.4.500\public to get the file copy \\2.168.4.500\public\test.txt To delete the connection use net use z: /del /yes

Linux Essential Shortcuts and Commands

Linux essential shortcuts and sanity commands Switch to the first text terminal. Under Linux you can have several (6 in standard setup) terminals opened at the same time. (n=1..6) Switch to the nth text terminal. tty Print the name of the terminal in which you are typing this command. Switch to the first GUI terminal (if X-windows is running on this terminal). (n=7..12) Switch to the nth GUI terminal (if a GUI terminal is running on screen n-1). On default, nothing is running on terminals 8 to 12, but you can run another server there. (In a text terminal) Autocomplete the command if there is only one option, or else show all the available options. THIS SHORTCUT IS GREAT! It even works at LILO prompt! Scroll and edit the command history. Press to execute. Scroll terminal output up. Work also at the login prompt, so you can scroll through your bootup messages. Scroll terminal output down. (in X-windows) Change to the next X-server resolution (if you set up the X-server to more than o...

Useful Windows DOS Commands For Linux Users

Useful Windows DOS Commands For Linux Users the most useful DOS commands available in Windows XP. DOS Commands must be run at the prompt of the Cmd.exe. To open Command Prompt, click Start, click Run, type cmd, and then click OK. Now try some useful commands; 1. To convert FAt32 volume into NTFS volume use :- CONVERT F: /FS:NTFS converts F drive into NTFS format. 2. Disconnect all the connection using net use use : - net use * /del /yes This will delete all the connection to your windows system; means If you have already connected to some system with shared folders and provided log in and password. After using this command you need to type login and password again. One can disconnect specific connection using net use. : net use will display all the connection list. 3. Today I learn about SDelete command. (works on Windows NT/2000's (Win2K) ) SDelete is a command line utility that takes a number of options. In any given use, it allows you to delete one or more files and/or direc...

Use of CUT Grep AWK Linux Command Combinations

Today I learn about power usage of grep cut and awk command; My requirement was to know on which physical USB port which device is connected, I can get this information from /proc/bus/usb/devices; which tells me about on which port which device is connected; my udev script will automatically mount the USB device with combination of Manufacturer name and serial number; Here is the steps how I reached to simple solution instead of coding hundred lines of code. To search for the SerialNumber in proc file i used $ grep 'SerialNumber' /proc/bus/usb/devices was giving me output in "S: SerialNumber=LDVTCGP6" format, I don't need that S: so used pipe; $ grep 'SerialNumber' /proc/bus/usb/devices | awk '{print $2}' This removes initial "S:" The output is combination of SerialNumber=LDVTCGP6 lines; I need to separate each strings with individual values; use cut command from linux. $ grep 'SerialNumber' /proc/bus/usb/devices | awk '{p...

How to Check Directory Size In Linux Also lists file size

How to check directory size in linux? du is the answer. du - estimate file space usage Summarize disk usage of each FILE, recursively for directories. useful options are -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) -s, --summarize display only a total for each argument To check the directory size use $ du -hs this will give current working directory size if specified gives specific directory size ie $du -hs /home/bhagwat/test/dir gives size of /dir. while df is also there but it gives disk space not directory space df - report filesystem disk space usage df displays the amount of disk space available on the filesystem containing each file name argument. If no file name is given, the space available on all currently mounted filesystems is shown.

fdisk Compilation for ARM-Target board Errors

Today Trying my luck with compiling fdisk utility; Source code at: http://www.gnu.org/software/fdisk Current fdisk 1.0 is July 7 2007 370K source .tar.gz ./configure --disable-cfdisk --host=arm-linux --build=i686 --disable-largefile ./configure says to install GNU/Parted before compiling. It needs parted/parted.h. http://www.gnu.org/software/parted Latest version is 1.8.7 of May 2007. 1.4GB source code tar.gz. ./configure --host=arm-linux --build=i686 configure: error: GNU Parted requires libuuid - a part of the e2fsprogs package (but GNU Parted requires libuuid - a part of the e2fsprogs package (but sometimes distributed separately in uuid-devel or similar) This can probably be found on your distribution's CD or FTP site or at: http://web.mit.edu/tytso/www/linux/e2fsprogs.html Note: if you are using pre compiled packages you will also need the development package as well (which may be called e2fsprogs-devel or something similar). If you compile e2fsprogs yourself then y...

Linux Command Listing Files In Directory

I was searching for Linux command for listing number of files in a directory . I got the luck with find command. $ find firmware/sedna/apps/NAS-2/webserver/html/js/ -type f | wc -l 23 and ls command shows output as $ ls -lh -rw-rw-r-- 1 bhagwat bhagwat 4.6K Jul 23 19:00 backup.js -rw-rw-r-- 1 bhagwat bhagwat 14K Aug 25 16:01 common.js drwxrwxr-x 2 bhagwat bhagwat 4.0K Aug 28 10:21 CVS -rw-rw-r-- 1 bhagwat bhagwat 804 Aug 3 16:35 del_usr.js -rw-rw-r-- 1 bhagwat bhagwat 4.8K Jul 23 19:00 disk_fs.js -rw-rw-r-- 1 bhagwat bhagwat 2.1K Aug 20 12:14 groups.js -rw-rw-r-- 1 bhagwat bhagwat 597 Aug 2 13:00 grp_member.js -rw-rw-r-- 1 bhagwat bhagwat 820 Aug 2 13:00 grp_shr.js -rw-rw-r-- 1 bhagwat bhagwat 28K Jul 22 16:45 jsfile.js -rwxrwxr-x 1 bhagwat bhagwat 1.6K Aug 21 10:38 lan.js -rw-rw-r-- 1 bhagwat bhagwat 198 Aug 12 19:49 pass_hint.js -rw-rw-r-- 1 bhagwat bhagwat 859 Aug 3 16:35 share_grp.js -rw-rw-r-- 1 bhagwat bhagwat 7.2K Aug 12 19:49 shares.js -rw-rw-r-- 1 bhag...

Copy File From Linux to Linux Machine - Use SCP

Today I learn about how to do secure copy from one linux machine to another linux machine. To copy files from one linux machine to another linux machine, one has to know login name and password for destination linux machine. simple use: of scp command. $ scp localfile username@destination_name or_IP:/dir/ it will prompt for password. provide the password and you file is copied. Below is compete demo.. $ scp ~bhagwat/.htpasswd root@192.168.2.143:/home/bhagwat/firmware/sedna/apps/NAS-2/filesystem/image_sedna/applications/nas/webserver/cgi-bin/login/ root@192.168.2.143's password: .htpasswd 100% 20 0.0KB/s 00:00