TRENDING NEWS

POPULAR NEWS

I Just Received Unix Files And I Can

How do you "tail" a file in Unix and have it listen and update live in your terminal as data is appended to the file?

tail -f will continually print updates to your screen. tail -F If the file is closed, zeroed out and reopened for writing. That happens when logs are rolled.

Which command in UNIX is used to recover files that were just deleted with the rm command?

If you immediately halt the system, are running Linux, and are using an ext2/ext3/ext4  file system you may be able to run debugfs on the unmounted file system and recover what you lost using debugfs or similar tools.Taking advantage of Ext3 journaling filesystem in a forensic investigationYou need to jump through these hoops because unix and work-alikes generally aren't designed to allow undelete.  Instead you're supposed to sit on your hands for 30 seconds after typing "rm", decide that's really what you want to do before pressing enter, and be sure to have a current backup to protect yourself where that fails.

How do I list just filenames in UNIX?

I have to use the "grep" command to do this. I am told to search a specific directory (not my working directory) for all files containing 'sequentialInsert' and then to just list the names of the files.

Which objects in UNIX might not have file descriptors?

What Bill said.  But if you're just referring to how objects are stored on disk, each filesystem (Unix/Linux/DOS, etc.) has it's own way of doing this, and Unix/Linux uses more than one filesystem ... user discretion ...Can you please rephrase that question if the answer Bill Karwin gave does not answer it?

How can you read variables into the mv file program in UNIX?

I think i understand your question.. you're asking how to pass shell variables into the mv command correct..

heres an example... lets say you lost a file and need to find it and automaticly move it to /home/bluechip/backup directory.. heres how with a variable pass

for ea in `find / -name some.file`; do mv $ea /home/bluechip/backup; done

run that from command line... and you will find your file in /home/bluebill/backup/some.file .. hope it helps.. its good to try with echo before a mv though!

please note you are invoking `some command` with ` ticks not ' ... just pay close attention to it.. you invoke `command` into ea variable..

then you use $ea to recall it later... for ea doesnt need $ to be set..


Hope it helps!


Blue chip hosting staff,
http://techblog.bluechiphosting.com

Unix Executable File - mac?

Hi there...you'll need to install X11 in order to run unix executable files: http://www.apple.com/downloads/macosx/ap...

If I wasn't clear with your question consider visiting the free Apple Discussion forum for more thorough assistance: http://discussions.apple.com/index.jspa

How can I copy files into multiple folders in Unix?

You can’t. Unix doesn’t have “folders”: it has directories, and their only contents are information about where to find the files.You have two choices:Do you want to have separate copies of the file in more than one directory? For example, you have two files foo and bar, and two directories Baz and Zot, you can write:$ cp foo Baz/foo$ cp bar Baz/bar$ cp foo Zot/foo$ cp bar Zot/barThis will give you four new files.Alternatively, if you just want directory entries pointing to the same file, you can use the ln (link) program and write$ ln foo bar Baz$ ln foo bar ZotNow you will have the what look like the same entries in the directories, but they’re not: they all point to the same two files. If you change one foo, the other two foos will immediately reflect that change.So, is this different from folders? No, the term “folder” is a silly word that deliberately misleads you to think that the files are inside the folder. On all current systems (BSD, Linux, MacOS, “Windows”) the system calls refer to directories, not “folders”. And for the first three at any rate, the system works as I describe above. I think that “Windows” does too, but I don’t know enough to be sure.Note that Ondrej Popp’s rather cryptic answer refers to copying directory hierarchies. He also uses the non-standard -r option, which exists in Linux, but not in Unix. In both, the -R (capitalized) option is equivalent, so I’d recommend using that for portability.

How can I print only the third line of a file with UNIX?

Take your pick:# Take the last line of the top three lines
head -n 3 my.txt | tail -n 1

# Tell sed to "be quiet", and print just the third line
sed -n 3p my.txt

# Tell sed to delete everything except the third line
sed '3!d' my.txt

# Tell awk to print the third input record of the current file
awk 'FNR==3 {print}' my.txt
Add invocations in your favorite scripting language, and we’re probably up to the dozens of options.

TRENDING NEWS