Seven useful Linux command, complement to the 25 ListFollow @ggarron
I have found this post 25 Linux commands and wanted to add these other seven I also use a lot.
Read the above post, as it is really good!
scp is used to copy files from one PC to another using a SSH connection.
scp -r email@example.com:/home/miguel/ firstname.lastname@example.org:/home/miguel/
Will copy the $HOME of user miguel from 10.1.2.2 to 10.1.2.3
more is a command that lets you paginate the output of a text file or any other output, so you can see more that only the length of your screen.
will paginate the output of file.txt
less is like more a pager tool, but it has better features, like scrolling up and down with PageUP and PageDOWN, or the arrow keys.
who, lets you see who is logged at a given time on the machine you are working at, you can also see the logging date and time and the virtual terminal that user is using.
Example: ggarron@debian:~$ who ggarron :0 2007-08-28 07:51 ggarron pts/0 2007-08-28 08:08 (:0.0)
w is like who, but it also gives you the information about what command the other users are running at that time.
ggarron@debian:~$ w 10:22:23 up 2:31, 2 users, load average: 0.21, 0.34, 0.37 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ggarron :0 - 07:51 ?xdm? 12:53m 0.64s x-session-manag ggarron pts/0 :0.0 08:08 0.00s 0.11s 0.00s w
mv is used to move files from one directory to another in the file-system.
mv /home/user/file1.txt /home/user/Desktop/file2.txt
In this example the file is moved from $HOME to $HOME/Desktop and also changed its name, if the source and destination directory is the same you can use this command to rename files.
rmdir is a complement to mkdir and it is intended to erase directories, which should be empty before attempting to erase them.
rmdir --parents dirctory1/directory2/directory3
This will remove the directories, directory1, directory2, and directory3.
head Is a command that complements tail, works the same way but it displays the first lines of a file instead of the last lines of it.
ggarron@debian:~$ head -10 date.txt HWCLOCK(8) HWCLOCK(8)
hwclock - query and set the hardware clock (RTC)
hwclock -r or hwclock --show hwclock -w or hwclock --systohc