Category: Linux

Copying a directory

Copying a directory cp -a dir1 dir2

‘date’ and ‘cal’ Commands

Some date finding commands.. date Mon Mar 10 23:52:08 IST 2008 cal March 2008 Su Mo Tu We Th Fr…

Create a Boot Floppy

Create a boot floppy – if you still have a floppy drive? mkbootdisk –device /dev/fd0 `uname -r`

Delete Multiple Folders

Remove two directories and their contents recursively rm -rf dir1 dir2

Remove a Directory Recursively

Remove a directory called ‘dir’ and contents recursively rm -rf dir

Create Compressed Image

Create a compressed iso image of cdrom on disk mkisofs /dev/cdrom | gzip > cd_iso.gz

Change Case

Convert from lower case to upper case echo ‘hello world’ | tr ‘[:lower:]’ ‘[:upper:]’

Starting SSHD

Starting SSHD – 2 methods sudo /usr/sbin/sshd sudo service sshd start

Install Package Debian(DPKG)

Install a package using dpkg in Debian linux dpkg -i package

Show PCI Devices

Shows all PCI devices in your system using this command lspci -tv